# -*- coding: utf-8 -*-
"""
:mod:`nubox.double`
===================

Provides the ``NuBox`` hierarchy of sub-classes to store floating point numbers 
as ``doubles``. 

"""
from __future__ import (division, with_statement, absolute_import, generators,
                         nested_scopes)

from .core import NuBoxScalar, NuBoxVector, NuBoxArray, NuBoxCube
from .const import FLOAT_DUMMY


class Double(NuBoxScalar):
    """
    A scalar ``NuBox`` to hold a floating-point number as ``double``.
    
    """
    clsdummy = FLOAT_DUMMY


class DoubleVector(Double, NuBoxVector):
    """
    A vector of ``Doubles``.

    """
    clschild = Double


class DoubleArray(DoubleVector, NuBoxArray):
    """
    An array of ``Doubles`` (vector of ``DoubleVectors``).

    """
    clschild = DoubleVector


class DoubleCube(DoubleArray, NuBoxCube):
    """
    A cube of ``Doubles`` (vector of ``DoubleArrays``).
    
    """
    clschild = DoubleArray


Double.clsparent = DoubleVector
DoubleVector.clsparent = DoubleArray
DoubleArray.clsparent = DoubleCube

del NuBoxScalar, NuBoxVector, NuBoxArray, NuBoxCube
